from django.urls import path, include

from web.views import account, home, project, manage

urlpatterns = [
    # 注册功能路由
    path('register/', account.register, name='register'),
    path('sms/code/', account.send_sms, name='send_sms'),
    path('login/sms/', account.login_sms, name='login_sms'),
    path('login/', account.login, name='login'),
    path('image/code/', account.image_code, name='image_code'),
    path('index/', home.index, name='index'),
    path('logout/', account.logout, name='logout'),

    # 项目列表
    path('project/list/', project.project_list, name='project_list'),
    path('project/star/<str:project_type>/<int:project_id>/', project.project_star, name='project_star'),
    path('project/unstar/<str:project_type>/<int:project_id>/', project.project_unstar, name='project_unstar'),

    # 项目管理
    path('manage/<int:project_id>/', include([
        path('wiki/', manage.wiki, name='wiki')

    ])),

]
